package util.validate  
{   
	import mx.validators.ValidationResult;   
	import mx.validators.Validator;   
	public class ComboBoxValidate extends Validator   
	{   
		// 如果ComboBox中没有项目被选中, 则返回这个错误信息   
		public var error:String="请选择一项";   
		public function ComboBoxValidate() {   
			super();   
		}   
		override protected function doValidation(value:Object):Array   
		{   
			var results:Array = [];
			if(value==null){
				results.push(new ValidationResult(true,"","error",error));
			}  
			return results;   
		}   
	}   
}